CC = gcc
LD = ld

INCDIRS += -Iinclude -I../include -I../libLICENSE/include
# TODO this is too specific for our setup. Remove it for the release.
INCDIRS += -I/usr/include/x86_64-linux-gnu
LDLIBS += -lLICENSE -lcrypto -ldl -L../libLICENSE/lib
CFLAGS += -Wall -g ${INCDIRS}
#CFLAGS += -DDEBUG


PROGS =socs
OBJS += socs.o 
OBJS += str_utils.o 
OBJS += nl_user.o 

all: ${PROGS} 

socs: $(OBJS)
	$(CC) -o $@ $(OBJS) $(LDLIBS)

socs.o: socs.c
	$(CC) -c $(CFLAGS) $< -o $@
str_utils.o: str_utils.c
	$(CC) -c $(CFLAGS) $< -o $@
nl_user.o: nl_user.c
	$(CC) -c $(CFLAGS) $< -o $@

clean:
	rm -f $(PROGS) $(OBJS)
